package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.Destination;
import cn.wolfcode.wolf2w.domain.Strategy;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface StrategyRepository extends MongoRepository<Strategy,String> {


    /**
     * 通过攻略目录id去查询攻略明细
     * @param catalogId
     * @return
     */
    List<Strategy> queryByCatalogId(String catalogId);

    /**
     * 通过目的地id去查询攻略明细
     * @param destId
     * @return
     */
    List<Strategy> queryByDestId(Pageable pageable, String destId);

    List<Strategy> queryByDestId(String destId);

    /**
     * 通过目的地名称查询对应的攻略
     * @param destName
     * @return
     */
    List<Strategy> queryByDestName(String destName);
}
